<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>小米账号--登录</title>
    <!-- 引入图标文件 -->
    <link rel="shortcut icon" href="../image/favicon.ico">
    <!-- 引入初始化样式文件 -->
    <link rel="stylesheet" href="../css/base.css">
    <!-- 引入注册页面样式文件 -->
    <link rel="stylesheet" href="../css/register.css">
    <!-- 表单校验 -->
    <script>
        /*验证密码是否一致*/
        window.onload = function () {

            document.getElementById("check").onsubmit = function () {
                // var username = document.getElementById("text").value;
                // //用户名不能为空
                // if (username == "") {
                //     alert("用户名不能为空!");
                //     document.getElementById("text").focus();
                //     return false;
                // }
                var pwd = document.getElementById("password").value;
                //二次密码repwd和上面pwd一致
                var repwd = document.getElementById("confirmPassword").value;
                if (pwd != repwd) {
                    alert("两次密码不一致，请核对");
                    return false;
                }
            }

        }
    </script>
</head>

<body>
    <!-- 登录页面制作 -->
    <div class="register">
        <div class="content">
            <p class="question"></p>
            <div class="logo">
                <h1><a href="../index.html" title="小米官网" target="_blank">小米官网</a></h1>
            </div>
            <h1 class="mi">登录小米账号</h1>
            <!-- 表单部分 -->
            <form action="" class="form_im" id="check" name="login">
                <h4>
                    <strong></strong>
                    <input type="username" name="username" placeholder="请输入用户名" required="required" class="wenben1"
                        id="text"><br>
                </h4>
                <h4>
                    <i></i>
                    <input type="password" name="password" placeholder="请输入密码" class="wenben2" required="required"
                        minlength="6" id="password"><br>
                </h4>
                <p>还没有帐号？去<a href="./register.html">注册</a></p>
                <input type="button" name="button" id="button" value="立即登录" class="log_in">
                <span id="tishi"></span>
            </form>
            <div class="read">
                <a href=""> 已阅读并同意： 小米 <strong class="strong1"> 用户协议 </strong> 和 <strong class="strong2"> 隐私政策
                    </strong></a>
            </div>
            <!-- 尾部备注制作 -->
            <div class="footer">
                <div class="footer_top">
                    <a href="" class="style_black">简体</a>
                    <span>|</span>
                    <a href="" class="gray">繁体</a>
                    <span>|</span>
                    <a href="" class="gray"> English </a>
                    <span>|</span>
                    <a href="" class="gray">常见问题</a>
                </div>
                <div class="footer_bottom">
                    <p>小米公司版权所有-京ICP备10046444-</p>
                    <a href=""><img src="../image/ghs.png" alt="">
                        京公网安备11010802020134号-京ICP证110507号</a>
                </div>
            </div>
        </div>
    </div>

    <script src="../js/axios.min.js"></script>
    <script src="../js/login.js"></script>
</body>

</html>